package org.springblade.demo.feign;

import org.springblade.common.constant.LauncherConstant;
import org.springblade.core.tool.api.R;
import org.springblade.demo.entity.Blog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(
	//定义Feign指向的service-id
	value = LauncherConstant.APPLICATION_DEMO_NAME
)
public interface BlogClient {

	/**
	 * 接口前缀
	 */
	String API_PREFIX = "/demo";

	/**
	 * 获取详情
	 }
	 *
	 * @param id 主键
	 * @return
	 */
	@GetMapping(API_PREFIX + "/detail/{id}")
	R<Blog> detail(@PathVariable("id") Long id);

}
